<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: pcl::OrganizedConnectedComponentSegmentation&lt; PointT, PointLT &gt; 模板类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpcl_1_1_organized_connected_component_segmentation.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">类</a> &#124;
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pro-methods">Protected 成员函数</a> &#124;
<a href="#pro-attribs">Protected 属性</a> &#124;
<a href="classpcl_1_1_organized_connected_component_segmentation-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">pcl::OrganizedConnectedComponentSegmentation&lt; PointT, PointLT &gt; 模板类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="classpcl_1_1_organized_connected_component_segmentation.html" title="OrganizedConnectedComponentSegmentation allows connected components to be found within organized poin...">OrganizedConnectedComponentSegmentation</a> allows connected components to be found within organized point cloud data, given a comparison function. Given an input cloud and a comparator, it will output a <a class="el" href="classpcl_1_1_point_cloud.html" title="PointCloud represents the base class in PCL for storing collections of 3D points.">PointCloud</a> of labels, giving each connected component a unique id, along with a vector of <a class="el" href="structpcl_1_1_point_indices.html">PointIndices</a> corresponding to each component. See <a class="el" href="classpcl_1_1_organized_multi_plane_segmentation.html" title="OrganizedMultiPlaneSegmentation finds all planes present in the input cloud, and outputs a vector of ...">OrganizedMultiPlaneSegmentation</a> for an example application.  
 <a href="classpcl_1_1_organized_connected_component_segmentation.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="organized__connected__component__segmentation_8h_source.html">organized_connected_component_segmentation.h</a>&gt;</code></p>
<div class="dynheader">
类 pcl::OrganizedConnectedComponentSegmentation&lt; PointT, PointLT &gt; 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classpcl_1_1_organized_connected_component_segmentation.png" usemap="#pcl::OrganizedConnectedComponentSegmentation_3C_20PointT_2C_20PointLT_20_3E_map" alt=""/>
  <map id="pcl::OrganizedConnectedComponentSegmentation_3C_20PointT_2C_20PointLT_20_3E_map" name="pcl::OrganizedConnectedComponentSegmentation_3C_20PointT_2C_20PointLT_20_3E_map">
<area href="classpcl_1_1_p_c_l_base.html" title="PCL base class. Implements methods that are used by most PCL algorithms." alt="pcl::PCLBase&lt; PointT &gt;" shape="rect" coords="0,0,403,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
类</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1_organized_connected_component_segmentation_1_1_neighbor.html">Neighbor</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:afe58af078766426f084375f1883250f0"><td class="memItemLeft" align="right" valign="top"><a id="afe58af078766426f084375f1883250f0"></a>
typedef <a class="el" href="classpcl_1_1_point_cloud.html">pcl::PointCloud</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloud</b></td></tr>
<tr class="separator:afe58af078766426f084375f1883250f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ffc02021d1fc3dc8a4f1629a3ab8a42"><td class="memItemLeft" align="right" valign="top"><a id="a5ffc02021d1fc3dc8a4f1629a3ab8a42"></a>
typedef PointCloud::Ptr&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloudPtr</b></td></tr>
<tr class="separator:a5ffc02021d1fc3dc8a4f1629a3ab8a42"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac16c977c7f08aa4389a721846293f073"><td class="memItemLeft" align="right" valign="top"><a id="ac16c977c7f08aa4389a721846293f073"></a>
typedef PointCloud::ConstPtr&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloudConstPtr</b></td></tr>
<tr class="separator:ac16c977c7f08aa4389a721846293f073"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6330f48907e4d66c2b6eef5bf7ea4701"><td class="memItemLeft" align="right" valign="top"><a id="a6330f48907e4d66c2b6eef5bf7ea4701"></a>
typedef <a class="el" href="classpcl_1_1_point_cloud.html">pcl::PointCloud</a>&lt; PointLT &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloudL</b></td></tr>
<tr class="separator:a6330f48907e4d66c2b6eef5bf7ea4701"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90b034444370fd1e7012ef559044b9d8"><td class="memItemLeft" align="right" valign="top"><a id="a90b034444370fd1e7012ef559044b9d8"></a>
typedef PointCloudL::Ptr&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloudLPtr</b></td></tr>
<tr class="separator:a90b034444370fd1e7012ef559044b9d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33b780040c084d2821c878d0ccad4915"><td class="memItemLeft" align="right" valign="top"><a id="a33b780040c084d2821c878d0ccad4915"></a>
typedef PointCloudL::ConstPtr&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloudLConstPtr</b></td></tr>
<tr class="separator:a33b780040c084d2821c878d0ccad4915"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af10096af3979ea06a765d59c3655c970"><td class="memItemLeft" align="right" valign="top"><a id="af10096af3979ea06a765d59c3655c970"></a>
typedef <a class="el" href="classpcl_1_1_comparator.html">pcl::Comparator</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>Comparator</b></td></tr>
<tr class="separator:af10096af3979ea06a765d59c3655c970"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcff5511b401097d08f210d53133ef88"><td class="memItemLeft" align="right" valign="top"><a id="adcff5511b401097d08f210d53133ef88"></a>
typedef Comparator::Ptr&#160;</td><td class="memItemRight" valign="bottom"><b>ComparatorPtr</b></td></tr>
<tr class="separator:adcff5511b401097d08f210d53133ef88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5e5e29f06fad1e78839070f21b2e3bc"><td class="memItemLeft" align="right" valign="top"><a id="aa5e5e29f06fad1e78839070f21b2e3bc"></a>
typedef Comparator::ConstPtr&#160;</td><td class="memItemRight" valign="bottom"><b>ComparatorConstPtr</b></td></tr>
<tr class="separator:aa5e5e29f06fad1e78839070f21b2e3bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classpcl_1_1_p_c_l_base"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classpcl_1_1_p_c_l_base')"><img src="closed.png" alt="-"/>&#160;Public 类型 继承自 <a class="el" href="classpcl_1_1_p_c_l_base.html">pcl::PCLBase&lt; PointT &gt;</a></td></tr>
<tr class="memitem:ae2f6f6863a73337858b7a7a054eaae4f inherit pub_types_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top"><a id="ae2f6f6863a73337858b7a7a054eaae4f"></a>
typedef <a class="el" href="classpcl_1_1_point_cloud.html">pcl::PointCloud</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloud</b></td></tr>
<tr class="separator:ae2f6f6863a73337858b7a7a054eaae4f inherit pub_types_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab84dd662cda89edb882fe5307b2136ea inherit pub_types_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top"><a id="ab84dd662cda89edb882fe5307b2136ea"></a>
typedef PointCloud::Ptr&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloudPtr</b></td></tr>
<tr class="separator:ab84dd662cda89edb882fe5307b2136ea inherit pub_types_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8326513fad0680b6993e2f1a79a6af4 inherit pub_types_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top"><a id="ac8326513fad0680b6993e2f1a79a6af4"></a>
typedef PointCloud::ConstPtr&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloudConstPtr</b></td></tr>
<tr class="separator:ac8326513fad0680b6993e2f1a79a6af4 inherit pub_types_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae51eae0c7b3e0b7178f4894dff90660a inherit pub_types_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top"><a id="ae51eae0c7b3e0b7178f4894dff90660a"></a>
typedef boost::shared_ptr&lt; <a class="el" href="structpcl_1_1_point_indices.html">PointIndices</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>PointIndicesPtr</b></td></tr>
<tr class="separator:ae51eae0c7b3e0b7178f4894dff90660a inherit pub_types_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51771056fb4ab8c448a11157acbe2ee0 inherit pub_types_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top"><a id="a51771056fb4ab8c448a11157acbe2ee0"></a>
typedef boost::shared_ptr&lt; <a class="el" href="structpcl_1_1_point_indices.html">PointIndices</a> const  &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>PointIndicesConstPtr</b></td></tr>
<tr class="separator:a51771056fb4ab8c448a11157acbe2ee0 inherit pub_types_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:ac1b874543a55b334921e0d96f8703819"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_organized_connected_component_segmentation.html#ac1b874543a55b334921e0d96f8703819">OrganizedConnectedComponentSegmentation</a> (const ComparatorConstPtr &amp;compare)</td></tr>
<tr class="memdesc:ac1b874543a55b334921e0d96f8703819"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor for <a class="el" href="classpcl_1_1_organized_connected_component_segmentation.html" title="OrganizedConnectedComponentSegmentation allows connected components to be found within organized poin...">OrganizedConnectedComponentSegmentation</a>  <a href="classpcl_1_1_organized_connected_component_segmentation.html#ac1b874543a55b334921e0d96f8703819">更多...</a><br /></td></tr>
<tr class="separator:ac1b874543a55b334921e0d96f8703819"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4130ab3e557c4daed35e0509e39133f3"><td class="memItemLeft" align="right" valign="top"><a id="a4130ab3e557c4daed35e0509e39133f3"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_organized_connected_component_segmentation.html#a4130ab3e557c4daed35e0509e39133f3">~OrganizedConnectedComponentSegmentation</a> ()</td></tr>
<tr class="memdesc:a4130ab3e557c4daed35e0509e39133f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor for <a class="el" href="classpcl_1_1_organized_connected_component_segmentation.html" title="OrganizedConnectedComponentSegmentation allows connected components to be found within organized poin...">OrganizedConnectedComponentSegmentation</a>. <br /></td></tr>
<tr class="separator:a4130ab3e557c4daed35e0509e39133f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2037cc4117003e0f501c90b57ea27de1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_organized_connected_component_segmentation.html#a2037cc4117003e0f501c90b57ea27de1">setComparator</a> (const ComparatorConstPtr &amp;compare)</td></tr>
<tr class="memdesc:a2037cc4117003e0f501c90b57ea27de1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provide a pointer to the comparator to be used for segmentation.  <a href="classpcl_1_1_organized_connected_component_segmentation.html#a2037cc4117003e0f501c90b57ea27de1">更多...</a><br /></td></tr>
<tr class="separator:a2037cc4117003e0f501c90b57ea27de1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1047cca5735d9ac70a11715e983abe7a"><td class="memItemLeft" align="right" valign="top"><a id="a1047cca5735d9ac70a11715e983abe7a"></a>
ComparatorConstPtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_organized_connected_component_segmentation.html#a1047cca5735d9ac70a11715e983abe7a">getComparator</a> () const</td></tr>
<tr class="memdesc:a1047cca5735d9ac70a11715e983abe7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the comparator. <br /></td></tr>
<tr class="separator:a1047cca5735d9ac70a11715e983abe7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a737a249b293489a41bbbdfc0a1eca7c1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_organized_connected_component_segmentation.html#a737a249b293489a41bbbdfc0a1eca7c1">segment</a> (<a class="el" href="classpcl_1_1_point_cloud.html">pcl::PointCloud</a>&lt; PointLT &gt; &amp;labels, std::vector&lt; <a class="el" href="structpcl_1_1_point_indices.html">pcl::PointIndices</a> &gt; &amp;label_indices) const</td></tr>
<tr class="memdesc:a737a249b293489a41bbbdfc0a1eca7c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform the connected component segmentation.  <a href="classpcl_1_1_organized_connected_component_segmentation.html#a737a249b293489a41bbbdfc0a1eca7c1">更多...</a><br /></td></tr>
<tr class="separator:a737a249b293489a41bbbdfc0a1eca7c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classpcl_1_1_p_c_l_base"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classpcl_1_1_p_c_l_base')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="classpcl_1_1_p_c_l_base.html">pcl::PCLBase&lt; PointT &gt;</a></td></tr>
<tr class="memitem:af4fbc5eb005057f8a0fc6d60bde595df inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top"><a id="af4fbc5eb005057f8a0fc6d60bde595df"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_p_c_l_base.html#af4fbc5eb005057f8a0fc6d60bde595df">PCLBase</a> ()</td></tr>
<tr class="memdesc:af4fbc5eb005057f8a0fc6d60bde595df inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Empty constructor. <br /></td></tr>
<tr class="separator:af4fbc5eb005057f8a0fc6d60bde595df inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a6dd7a91275d7737cf1b18005b47244 inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top"><a id="a7a6dd7a91275d7737cf1b18005b47244"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_p_c_l_base.html#a7a6dd7a91275d7737cf1b18005b47244">PCLBase</a> (const <a class="el" href="classpcl_1_1_p_c_l_base.html">PCLBase</a> &amp;base)</td></tr>
<tr class="memdesc:a7a6dd7a91275d7737cf1b18005b47244 inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor. <br /></td></tr>
<tr class="separator:a7a6dd7a91275d7737cf1b18005b47244 inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5d6846e98e59c37dcc3dc9958d53966 inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top"><a id="ad5d6846e98e59c37dcc3dc9958d53966"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_p_c_l_base.html#ad5d6846e98e59c37dcc3dc9958d53966">~PCLBase</a> ()</td></tr>
<tr class="memdesc:ad5d6846e98e59c37dcc3dc9958d53966 inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:ad5d6846e98e59c37dcc3dc9958d53966 inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1952d7101f3942bac3b69ed55c1ca7ea inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_p_c_l_base.html#a1952d7101f3942bac3b69ed55c1ca7ea">setInputCloud</a> (const PointCloudConstPtr &amp;cloud)</td></tr>
<tr class="memdesc:a1952d7101f3942bac3b69ed55c1ca7ea inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provide a pointer to the input dataset  <a href="classpcl_1_1_p_c_l_base.html#a1952d7101f3942bac3b69ed55c1ca7ea">更多...</a><br /></td></tr>
<tr class="separator:a1952d7101f3942bac3b69ed55c1ca7ea inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8cd745c4f7a792212f4fc3720b9d46ea inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top"><a id="a8cd745c4f7a792212f4fc3720b9d46ea"></a>
PointCloudConstPtr const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_p_c_l_base.html#a8cd745c4f7a792212f4fc3720b9d46ea">getInputCloud</a> () const</td></tr>
<tr class="memdesc:a8cd745c4f7a792212f4fc3720b9d46ea inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a pointer to the input point cloud dataset. <br /></td></tr>
<tr class="separator:a8cd745c4f7a792212f4fc3720b9d46ea inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab219359de6eb34c9d51e2e976dd1a0d1 inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_p_c_l_base.html#ab219359de6eb34c9d51e2e976dd1a0d1">setIndices</a> (const IndicesPtr &amp;indices)</td></tr>
<tr class="memdesc:ab219359de6eb34c9d51e2e976dd1a0d1 inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provide a pointer to the vector of indices that represents the input data.  <a href="classpcl_1_1_p_c_l_base.html#ab219359de6eb34c9d51e2e976dd1a0d1">更多...</a><br /></td></tr>
<tr class="separator:ab219359de6eb34c9d51e2e976dd1a0d1 inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a436c68c74b31e4dd00000adfbb11ca7c inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_p_c_l_base.html#a436c68c74b31e4dd00000adfbb11ca7c">setIndices</a> (const IndicesConstPtr &amp;indices)</td></tr>
<tr class="memdesc:a436c68c74b31e4dd00000adfbb11ca7c inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provide a pointer to the vector of indices that represents the input data.  <a href="classpcl_1_1_p_c_l_base.html#a436c68c74b31e4dd00000adfbb11ca7c">更多...</a><br /></td></tr>
<tr class="separator:a436c68c74b31e4dd00000adfbb11ca7c inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9cc90d8364ce968566f75800d3773ca inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_p_c_l_base.html#af9cc90d8364ce968566f75800d3773ca">setIndices</a> (const PointIndicesConstPtr &amp;indices)</td></tr>
<tr class="memdesc:af9cc90d8364ce968566f75800d3773ca inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provide a pointer to the vector of indices that represents the input data.  <a href="classpcl_1_1_p_c_l_base.html#af9cc90d8364ce968566f75800d3773ca">更多...</a><br /></td></tr>
<tr class="separator:af9cc90d8364ce968566f75800d3773ca inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a930c7a6375fdf65ff8cfdb4eb4a6d996 inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_p_c_l_base.html#a930c7a6375fdf65ff8cfdb4eb4a6d996">setIndices</a> (size_t row_start, size_t col_start, size_t nb_rows, size_t nb_cols)</td></tr>
<tr class="memdesc:a930c7a6375fdf65ff8cfdb4eb4a6d996 inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the indices for the points laying within an interest region of the point cloud.  <a href="classpcl_1_1_p_c_l_base.html#a930c7a6375fdf65ff8cfdb4eb4a6d996">更多...</a><br /></td></tr>
<tr class="separator:a930c7a6375fdf65ff8cfdb4eb4a6d996 inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a058753dd4de73d3d0062fe2e452fba3c inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top"><a id="a058753dd4de73d3d0062fe2e452fba3c"></a>
IndicesPtr const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_p_c_l_base.html#a058753dd4de73d3d0062fe2e452fba3c">getIndices</a> ()</td></tr>
<tr class="memdesc:a058753dd4de73d3d0062fe2e452fba3c inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a pointer to the vector of indices used. <br /></td></tr>
<tr class="separator:a058753dd4de73d3d0062fe2e452fba3c inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acae187b37230758959572ceb1e6e2045 inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top"><a id="acae187b37230758959572ceb1e6e2045"></a>
IndicesConstPtr const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_p_c_l_base.html#acae187b37230758959572ceb1e6e2045">getIndices</a> () const</td></tr>
<tr class="memdesc:acae187b37230758959572ceb1e6e2045 inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a pointer to the vector of indices used. <br /></td></tr>
<tr class="separator:acae187b37230758959572ceb1e6e2045 inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7335fedb0af0930b9d1dedcb54ba201 inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_p_c_l_base.html#af7335fedb0af0930b9d1dedcb54ba201">operator[]</a> (size_t pos) const</td></tr>
<tr class="memdesc:af7335fedb0af0930b9d1dedcb54ba201 inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Override <a class="el" href="classpcl_1_1_point_cloud.html" title="PointCloud represents the base class in PCL for storing collections of 3D points.">PointCloud</a> operator[] to shorten code  <a href="classpcl_1_1_p_c_l_base.html#af7335fedb0af0930b9d1dedcb54ba201">更多...</a><br /></td></tr>
<tr class="separator:af7335fedb0af0930b9d1dedcb54ba201 inherit pub_methods_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a0263cb303cf22c046ae3984746eeae20"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_organized_connected_component_segmentation.html#a0263cb303cf22c046ae3984746eeae20">findLabeledRegionBoundary</a> (int start_idx, PointCloudLPtr labels, <a class="el" href="structpcl_1_1_point_indices.html">pcl::PointIndices</a> &amp;boundary_indices)</td></tr>
<tr class="memdesc:a0263cb303cf22c046ae3984746eeae20"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find the boundary points / contour of a connected component  <a href="classpcl_1_1_organized_connected_component_segmentation.html#a0263cb303cf22c046ae3984746eeae20">更多...</a><br /></td></tr>
<tr class="separator:a0263cb303cf22c046ae3984746eeae20"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected 成员函数</h2></td></tr>
<tr class="memitem:a1636c8e418782610c3d2c0d41f5e4560"><td class="memItemLeft" align="right" valign="top"><a id="a1636c8e418782610c3d2c0d41f5e4560"></a>
unsigned&#160;</td><td class="memItemRight" valign="bottom"><b>findRoot</b> (const std::vector&lt; unsigned &gt; &amp;runs, unsigned index) const</td></tr>
<tr class="separator:a1636c8e418782610c3d2c0d41f5e4560"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_classpcl_1_1_p_c_l_base"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classpcl_1_1_p_c_l_base')"><img src="closed.png" alt="-"/>&#160;Protected 成员函数 继承自 <a class="el" href="classpcl_1_1_p_c_l_base.html">pcl::PCLBase&lt; PointT &gt;</a></td></tr>
<tr class="memitem:acceb20854934f4cf77e266eb5a44d4f0 inherit pro_methods_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_p_c_l_base.html#acceb20854934f4cf77e266eb5a44d4f0">initCompute</a> ()</td></tr>
<tr class="memdesc:acceb20854934f4cf77e266eb5a44d4f0 inherit pro_methods_classpcl_1_1_p_c_l_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method should get called before starting the actual computation.  <a href="classpcl_1_1_p_c_l_base.html#acceb20854934f4cf77e266eb5a44d4f0">更多...</a><br /></td></tr>
<tr class="separator:acceb20854934f4cf77e266eb5a44d4f0 inherit pro_methods_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc426c4eebb94b7734d4fa556bff1420 inherit pro_methods_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top"><a id="afc426c4eebb94b7734d4fa556bff1420"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_p_c_l_base.html#afc426c4eebb94b7734d4fa556bff1420">deinitCompute</a> ()</td></tr>
<tr class="memdesc:afc426c4eebb94b7734d4fa556bff1420 inherit pro_methods_classpcl_1_1_p_c_l_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method should get called after finishing the actual computation. <br /></td></tr>
<tr class="separator:afc426c4eebb94b7734d4fa556bff1420 inherit pro_methods_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected 属性</h2></td></tr>
<tr class="memitem:a740e8c0007bec3af1b7af3cc4bc98de8"><td class="memItemLeft" align="right" valign="top"><a id="a740e8c0007bec3af1b7af3cc4bc98de8"></a>
ComparatorConstPtr&#160;</td><td class="memItemRight" valign="bottom"><b>compare_</b></td></tr>
<tr class="separator:a740e8c0007bec3af1b7af3cc4bc98de8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_classpcl_1_1_p_c_l_base"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classpcl_1_1_p_c_l_base')"><img src="closed.png" alt="-"/>&#160;Protected 属性 继承自 <a class="el" href="classpcl_1_1_p_c_l_base.html">pcl::PCLBase&lt; PointT &gt;</a></td></tr>
<tr class="memitem:a09c70d8e06e3fb4f07903fe6f8d67869 inherit pro_attribs_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top"><a id="a09c70d8e06e3fb4f07903fe6f8d67869"></a>
PointCloudConstPtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_p_c_l_base.html#a09c70d8e06e3fb4f07903fe6f8d67869">input_</a></td></tr>
<tr class="memdesc:a09c70d8e06e3fb4f07903fe6f8d67869 inherit pro_attribs_classpcl_1_1_p_c_l_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">The input point cloud dataset. <br /></td></tr>
<tr class="separator:a09c70d8e06e3fb4f07903fe6f8d67869 inherit pro_attribs_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaee847c8a517ebf365bad2cb182a6626 inherit pro_attribs_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top"><a id="aaee847c8a517ebf365bad2cb182a6626"></a>
IndicesPtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_p_c_l_base.html#aaee847c8a517ebf365bad2cb182a6626">indices_</a></td></tr>
<tr class="memdesc:aaee847c8a517ebf365bad2cb182a6626 inherit pro_attribs_classpcl_1_1_p_c_l_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">A pointer to the vector of point indices to use. <br /></td></tr>
<tr class="separator:aaee847c8a517ebf365bad2cb182a6626 inherit pro_attribs_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada1eadb824d34ca9206a86343d9760bb inherit pro_attribs_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top"><a id="ada1eadb824d34ca9206a86343d9760bb"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_p_c_l_base.html#ada1eadb824d34ca9206a86343d9760bb">use_indices_</a></td></tr>
<tr class="memdesc:ada1eadb824d34ca9206a86343d9760bb inherit pro_attribs_classpcl_1_1_p_c_l_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set to true if point indices are used. <br /></td></tr>
<tr class="separator:ada1eadb824d34ca9206a86343d9760bb inherit pro_attribs_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adadb0299f144528020ed558af6879662 inherit pro_attribs_classpcl_1_1_p_c_l_base"><td class="memItemLeft" align="right" valign="top"><a id="adadb0299f144528020ed558af6879662"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_p_c_l_base.html#adadb0299f144528020ed558af6879662">fake_indices_</a></td></tr>
<tr class="memdesc:adadb0299f144528020ed558af6879662 inherit pro_attribs_classpcl_1_1_p_c_l_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">If no set of indices are given, we construct a set of fake indices that mimic the input <a class="el" href="classpcl_1_1_point_cloud.html" title="PointCloud represents the base class in PCL for storing collections of 3D points.">PointCloud</a>. <br /></td></tr>
<tr class="separator:adadb0299f144528020ed558af6879662 inherit pro_attribs_classpcl_1_1_p_c_l_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><h3>template&lt;typename PointT, typename PointLT&gt;<br />
class pcl::OrganizedConnectedComponentSegmentation&lt; PointT, PointLT &gt;</h3>

<p><a class="el" href="classpcl_1_1_organized_connected_component_segmentation.html" title="OrganizedConnectedComponentSegmentation allows connected components to be found within organized poin...">OrganizedConnectedComponentSegmentation</a> allows connected components to be found within organized point cloud data, given a comparison function. Given an input cloud and a comparator, it will output a <a class="el" href="classpcl_1_1_point_cloud.html" title="PointCloud represents the base class in PCL for storing collections of 3D points.">PointCloud</a> of labels, giving each connected component a unique id, along with a vector of <a class="el" href="structpcl_1_1_point_indices.html">PointIndices</a> corresponding to each component. See <a class="el" href="classpcl_1_1_organized_multi_plane_segmentation.html" title="OrganizedMultiPlaneSegmentation finds all planes present in the input cloud, and outputs a vector of ...">OrganizedMultiPlaneSegmentation</a> for an example application. </p>
<dl class="section author"><dt>作者</dt><dd>Alex Trevor, Suat Gedikli </dd></dl>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="ac1b874543a55b334921e0d96f8703819"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac1b874543a55b334921e0d96f8703819">&#9670;&nbsp;</a></span>OrganizedConnectedComponentSegmentation()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT , typename PointLT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classpcl_1_1_organized_connected_component_segmentation.html">pcl::OrganizedConnectedComponentSegmentation</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a>, PointLT &gt;::<a class="el" href="classpcl_1_1_organized_connected_component_segmentation.html">OrganizedConnectedComponentSegmentation</a> </td>
          <td>(</td>
          <td class="paramtype">const ComparatorConstPtr &amp;&#160;</td>
          <td class="paramname"><em>compare</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor for <a class="el" href="classpcl_1_1_organized_connected_component_segmentation.html" title="OrganizedConnectedComponentSegmentation allows connected components to be found within organized poin...">OrganizedConnectedComponentSegmentation</a> </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">compare</td><td>A pointer to the comparator to be used for segmentation. Must be an instance of <a class="el" href="classpcl_1_1_comparator.html" title="Comparator is the base class for comparators that compare two points given some function....">pcl::Comparator</a>. </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        : compare_ (compare)</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;      {</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;      }</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a0263cb303cf22c046ae3984746eeae20"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0263cb303cf22c046ae3984746eeae20">&#9670;&nbsp;</a></span>findLabeledRegionBoundary()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT , typename PointLT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_organized_connected_component_segmentation.html">pcl::OrganizedConnectedComponentSegmentation</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a>, PointLT &gt;::findLabeledRegionBoundary </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>start_idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PointCloudLPtr&#160;</td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structpcl_1_1_point_indices.html">pcl::PointIndices</a> &amp;&#160;</td>
          <td class="paramname"><em>boundary_indices</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Find the boundary points / contour of a connected component </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">start_idx</td><td>the first (lowest) index of the connected component for which a boundary shoudl be returned </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">labels</td><td>the <a class="el" href="structpcl_1_1_label.html">Label</a> cloud produced by segmentation </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">boundary_indices</td><td>the indices of the boundary points for the label corresponding to start_idx</td></tr>
  </table>
  </dd>
</dl>
<p>Directions: 1 2 3 0 x 4 7 6 5 e.g. direction y means we came from pixel with label y to the center pixel x </p>
<div class="fragment"><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;{</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;  boundary_indices.indices.clear ();</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;  <span class="keywordtype">int</span> curr_idx = start_idx;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  <span class="keywordtype">int</span> curr_x   = start_idx % labels-&gt;width;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  <span class="keywordtype">int</span> curr_y   = start_idx / labels-&gt;width;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;  <span class="keywordtype">unsigned</span> label = labels-&gt;points[start_idx].label;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;  </div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;  <span class="comment">// fill lookup table for next points to visit</span></div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;  Neighbor directions [8] = {Neighbor(-1,  0,                 -1),</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;                             Neighbor(-1, -1, -labels-&gt;width - 1), </div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;                             Neighbor( 0, -1, -labels-&gt;width    ),</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;                             Neighbor( 1, -1, -labels-&gt;width + 1),</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;                             Neighbor( 1,  0,                  1),</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;                             Neighbor( 1,  1,  labels-&gt;width + 1),</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;                             Neighbor( 0,  1,  labels-&gt;width    ),</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;                             Neighbor(-1,  1,  labels-&gt;width - 1)};</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;  </div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;  <span class="comment">// find one pixel with other label in the neighborhood -&gt; assume thats the one we came from</span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;  <span class="keywordtype">int</span> direction = -1;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;  <span class="keywordtype">int</span> x;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;  <span class="keywordtype">int</span> y;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;  <span class="keywordtype">int</span> index;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> dIdx = 0; dIdx &lt; 8; ++dIdx)</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;  {</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    x = curr_x + directions [dIdx].d_x;</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    y = curr_y + directions [dIdx].d_y;</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    index = curr_idx + directions [dIdx].d_index;</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="keywordflow">if</span> (x &gt;= 0 &amp;&amp; x &lt; <span class="keywordtype">int</span>(labels-&gt;width) &amp;&amp; y &gt;= 0 &amp;&amp; y &lt; <span class="keywordtype">int</span>(labels-&gt;height) &amp;&amp; labels-&gt;points[index].label != label)</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    {</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;      direction = dIdx;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;      <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    }</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  }</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160; </div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;  <span class="comment">// no connection to outer regions =&gt; start_idx is not on the border</span></div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;  <span class="keywordflow">if</span> (direction == -1)</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  </div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;  boundary_indices.indices.push_back (start_idx);</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;  </div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;  <span class="keywordflow">do</span> {</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="keywordtype">unsigned</span> nIdx;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> dIdx = 1; dIdx &lt;= 8; ++dIdx)</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    {</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;      nIdx = (direction + dIdx) &amp; 7;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;      </div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;      x = curr_x + directions [nIdx].d_x;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;      y = curr_y + directions [nIdx].d_y;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;      index = curr_idx + directions [nIdx].d_index;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;      <span class="keywordflow">if</span> (x &gt;= 0 &amp;&amp; x &lt; <span class="keywordtype">int</span>(labels-&gt;width) &amp;&amp; y &gt;= 0 &amp;&amp; y &lt; int(labels-&gt;height) &amp;&amp; labels-&gt;points[index].label == label)</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    }</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    </div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <span class="comment">// update the direction</span></div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    direction = (nIdx + 4) &amp; 7;</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    curr_idx += directions [nIdx].d_index;</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    curr_x   += directions [nIdx].d_x;</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    curr_y   += directions [nIdx].d_y;</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    boundary_indices.indices.push_back(curr_idx);</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;  } <span class="keywordflow">while</span> ( curr_idx != start_idx);</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a737a249b293489a41bbbdfc0a1eca7c1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a737a249b293489a41bbbdfc0a1eca7c1">&#9670;&nbsp;</a></span>segment()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT , typename PointLT &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_organized_connected_component_segmentation.html">pcl::OrganizedConnectedComponentSegmentation</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a>, PointLT &gt;::segment </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classpcl_1_1_point_cloud.html">pcl::PointCloud</a>&lt; PointLT &gt; &amp;&#160;</td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; <a class="el" href="structpcl_1_1_point_indices.html">pcl::PointIndices</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>label_indices</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Perform the connected component segmentation. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">labels</td><td>a <a class="el" href="classpcl_1_1_point_cloud.html" title="PointCloud represents the base class in PCL for storing collections of 3D points.">PointCloud</a> of labels: each connected component will have a unique id. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">label_indices</td><td>a vector of <a class="el" href="structpcl_1_1_point_indices.html">PointIndices</a> corresponding to each label / component id. </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;{</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;  std::vector&lt;unsigned&gt; run_ids;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160; </div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;  <span class="keywordtype">unsigned</span> invalid_label = std::numeric_limits&lt;unsigned&gt;::max ();</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;  PointLT invalid_pt;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;  invalid_pt.label = std::numeric_limits&lt;unsigned&gt;::max ();</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;  labels.<a class="code" href="classpcl_1_1_point_cloud.html#af16a62638198313b9c093127c492c884">points</a>.resize (<a class="code" href="classpcl_1_1_p_c_l_base.html#a09c70d8e06e3fb4f07903fe6f8d67869">input_</a>-&gt;points.size (), invalid_pt);</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;  labels.<a class="code" href="classpcl_1_1_point_cloud.html#a2185a6453f8ad905d7bdf7b45754a160">width</a> = <a class="code" href="classpcl_1_1_p_c_l_base.html#a09c70d8e06e3fb4f07903fe6f8d67869">input_</a>-&gt;width;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;  labels.<a class="code" href="classpcl_1_1_point_cloud.html#a4f34b45220c57f96607513ffad0d9582">height</a> = <a class="code" href="classpcl_1_1_p_c_l_base.html#a09c70d8e06e3fb4f07903fe6f8d67869">input_</a>-&gt;height;</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> clust_id = 0;</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;  </div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;  <span class="comment">//First pixel</span></div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;  <span class="keywordflow">if</span> (pcl_isfinite (<a class="code" href="classpcl_1_1_p_c_l_base.html#a09c70d8e06e3fb4f07903fe6f8d67869">input_</a>-&gt;points[0].x))</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;  {</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    labels[0].label = clust_id++;</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    run_ids.<a class="code" href="classpcl_1_1_point_cloud.html#a0b4d7abee110e47d90635eb042488bb4">push_back</a> (labels[0].label );</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;  }   </div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160; </div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;  <span class="comment">// First row</span></div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> colIdx = 1; colIdx &lt; static_cast&lt;int&gt; (<a class="code" href="classpcl_1_1_p_c_l_base.html#a09c70d8e06e3fb4f07903fe6f8d67869">input_</a>-&gt;width); ++colIdx)</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;  {</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    <span class="keywordflow">if</span> (!pcl_isfinite (<a class="code" href="classpcl_1_1_p_c_l_base.html#a09c70d8e06e3fb4f07903fe6f8d67869">input_</a>-&gt;points[colIdx].x))</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;      <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (compare_-&gt;compare (colIdx, colIdx - 1 ))</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    {</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;      labels[colIdx].label = labels[colIdx - 1].label;</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    }</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    {</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;      labels[colIdx].label = clust_id++;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;      run_ids.<a class="code" href="classpcl_1_1_point_cloud.html#a0b4d7abee110e47d90635eb042488bb4">push_back</a> (labels[colIdx].label );</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    }</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;  }</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;  </div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;  <span class="comment">// Everything else</span></div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> current_row = <a class="code" href="classpcl_1_1_p_c_l_base.html#a09c70d8e06e3fb4f07903fe6f8d67869">input_</a>-&gt;width;</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> previous_row = 0;</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> rowIdx = 1; rowIdx &lt; <a class="code" href="classpcl_1_1_p_c_l_base.html#a09c70d8e06e3fb4f07903fe6f8d67869">input_</a>-&gt;height; ++rowIdx, previous_row = current_row, current_row += <a class="code" href="classpcl_1_1_p_c_l_base.html#a09c70d8e06e3fb4f07903fe6f8d67869">input_</a>-&gt;width)</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;  {</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <span class="comment">// First pixel</span></div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    <span class="keywordflow">if</span> (pcl_isfinite (<a class="code" href="classpcl_1_1_p_c_l_base.html#a09c70d8e06e3fb4f07903fe6f8d67869">input_</a>-&gt;points[current_row].x))</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    {</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;      <span class="keywordflow">if</span> (compare_-&gt;compare (current_row, previous_row))</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;      {</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        labels[current_row].label = labels[previous_row].label;</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;      }</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;      <span class="keywordflow">else</span></div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;      {</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        labels[current_row].label = clust_id++;</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        run_ids.<a class="code" href="classpcl_1_1_point_cloud.html#a0b4d7abee110e47d90635eb042488bb4">push_back</a> (labels[current_row].label);</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;      }</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    }</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    </div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <span class="comment">// Rest of row</span></div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> colIdx = 1; colIdx &lt; static_cast&lt;int&gt; (<a class="code" href="classpcl_1_1_p_c_l_base.html#a09c70d8e06e3fb4f07903fe6f8d67869">input_</a>-&gt;width); ++colIdx)</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    {</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;      <span class="keywordflow">if</span> (pcl_isfinite (<a class="code" href="classpcl_1_1_p_c_l_base.html#a09c70d8e06e3fb4f07903fe6f8d67869">input_</a>-&gt;points[current_row + colIdx].x))</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;      {</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        <span class="keywordflow">if</span> (compare_-&gt;compare (current_row + colIdx, current_row + colIdx - 1))</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;        {</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;          labels[current_row + colIdx].label = labels[current_row + colIdx - 1].label;</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;        }</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        <span class="keywordflow">if</span> (compare_-&gt;compare (current_row + colIdx, previous_row + colIdx) )</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;        {</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;          <span class="keywordflow">if</span> (labels[current_row + colIdx].label == invalid_label)</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;            labels[current_row + colIdx].label = labels[previous_row + colIdx].label;</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;          <span class="keywordflow">else</span> <span class="keywordflow">if</span> (labels[previous_row + colIdx].label != invalid_label)</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;          {</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;            <span class="keywordtype">unsigned</span> root1 = findRoot (run_ids, labels[current_row + colIdx].label);</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;            <span class="keywordtype">unsigned</span> root2 = findRoot (run_ids, labels[previous_row + colIdx].label);</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;            </div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;            <span class="keywordflow">if</span> (root1 &lt; root2)</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;              run_ids[root2] = root1;</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;              run_ids[root1] = root2;</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;          }</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;        }</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        </div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        <span class="keywordflow">if</span> (labels[current_row + colIdx].label == invalid_label)</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;        {</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;          labels[current_row + colIdx].label = clust_id++;</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;          run_ids.<a class="code" href="classpcl_1_1_point_cloud.html#a0b4d7abee110e47d90635eb042488bb4">push_back</a> (labels[current_row + colIdx].label);</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        }</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        </div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;      }</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;    }</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;  }</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;  </div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;  std::vector&lt;unsigned&gt; map (clust_id);</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;  <span class="keywordtype">unsigned</span> max_id = 0;</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> runIdx = 0; runIdx &lt; run_ids.size (); ++runIdx)</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;  {</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;    <span class="comment">// if it is its own root -&gt; new region</span></div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    <span class="keywordflow">if</span> (run_ids[runIdx] == runIdx)</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;      map[runIdx] = max_id++;</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    <span class="keywordflow">else</span> <span class="comment">// assign this sub-segment to the region (root) it belongs</span></div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;      map [runIdx] = map [findRoot (run_ids, runIdx)];</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;  }</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160; </div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;  label_indices.resize (max_id + 1);</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> idx = 0; idx &lt; <a class="code" href="classpcl_1_1_p_c_l_base.html#a09c70d8e06e3fb4f07903fe6f8d67869">input_</a>-&gt;points.size (); idx++)</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;  {</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    <span class="keywordflow">if</span> (labels[idx].label != invalid_label)</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    {</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;      labels[idx].label = map[labels[idx].label];</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;      label_indices[labels[idx].label].indices.<a class="code" href="classpcl_1_1_point_cloud.html#a0b4d7abee110e47d90635eb042488bb4">push_back</a> (idx);</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    }</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;  }</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;}</div>
<div class="ttc" id="aclasspcl_1_1_p_c_l_base_html_a09c70d8e06e3fb4f07903fe6f8d67869"><div class="ttname"><a href="classpcl_1_1_p_c_l_base.html#a09c70d8e06e3fb4f07903fe6f8d67869">pcl::PCLBase::input_</a></div><div class="ttdeci">PointCloudConstPtr input_</div><div class="ttdoc">The input point cloud dataset.</div><div class="ttdef"><b>Definition:</b> pcl_base.h:150</div></div>
<div class="ttc" id="aclasspcl_1_1_point_cloud_html_a0b4d7abee110e47d90635eb042488bb4"><div class="ttname"><a href="classpcl_1_1_point_cloud.html#a0b4d7abee110e47d90635eb042488bb4">pcl::PointCloud::push_back</a></div><div class="ttdeci">void push_back(const PointT &amp;pt)</div><div class="ttdoc">Insert a new point in the cloud, at the end of the container.</div><div class="ttdef"><b>Definition:</b> point_cloud.h:480</div></div>
<div class="ttc" id="aclasspcl_1_1_point_cloud_html_a2185a6453f8ad905d7bdf7b45754a160"><div class="ttname"><a href="classpcl_1_1_point_cloud.html#a2185a6453f8ad905d7bdf7b45754a160">pcl::PointCloud::width</a></div><div class="ttdeci">uint32_t width</div><div class="ttdoc">The point cloud width (if organized as an image-structure).</div><div class="ttdef"><b>Definition:</b> point_cloud.h:413</div></div>
<div class="ttc" id="aclasspcl_1_1_point_cloud_html_a4f34b45220c57f96607513ffad0d9582"><div class="ttname"><a href="classpcl_1_1_point_cloud.html#a4f34b45220c57f96607513ffad0d9582">pcl::PointCloud::height</a></div><div class="ttdeci">uint32_t height</div><div class="ttdoc">The point cloud height (if organized as an image-structure).</div><div class="ttdef"><b>Definition:</b> point_cloud.h:415</div></div>
<div class="ttc" id="aclasspcl_1_1_point_cloud_html_af16a62638198313b9c093127c492c884"><div class="ttname"><a href="classpcl_1_1_point_cloud.html#af16a62638198313b9c093127c492c884">pcl::PointCloud::points</a></div><div class="ttdeci">std::vector&lt; PointT, Eigen::aligned_allocator&lt; PointT &gt; &gt; points</div><div class="ttdoc">The point data.</div><div class="ttdef"><b>Definition:</b> point_cloud.h:410</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a2037cc4117003e0f501c90b57ea27de1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2037cc4117003e0f501c90b57ea27de1">&#9670;&nbsp;</a></span>setComparator()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT , typename PointLT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_organized_connected_component_segmentation.html">pcl::OrganizedConnectedComponentSegmentation</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a>, PointLT &gt;::setComparator </td>
          <td>(</td>
          <td class="paramtype">const ComparatorConstPtr &amp;&#160;</td>
          <td class="paramname"><em>compare</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Provide a pointer to the comparator to be used for segmentation. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">compare</td><td>the comparator </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;      {</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;        compare_ = compare;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;      }</div>
</div><!-- fragment -->
</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>segmentation/include/pcl/segmentation/<a class="el" href="organized__connected__component__segmentation_8h_source.html">organized_connected_component_segmentation.h</a></li>
<li>segmentation/include/pcl/segmentation/impl/<a class="el" href="organized__connected__component__segmentation_8hpp_source.html">organized_connected_component_segmentation.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>pcl</b></li><li class="navelem"><a class="el" href="classpcl_1_1_organized_connected_component_segmentation.html">OrganizedConnectedComponentSegmentation</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
